package com.beaut.project.control;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.beaut.project.service.WareHouseService;
import com.beaut.project.util.Utility;


/**
 * 负责仓库管理
 * @author jzk
 *
 */
@Controller
@RequestMapping("/warehouse")
public class WareHouseController extends BaseControl{
	@Autowired
    private WareHouseService warehouseService;
	
    @RequestMapping(value = "/listPageWareHouse", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageWareHouse(HttpServletRequest request) {
    	Map<String, Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageWareHouse(map);
    }
    @RequestMapping(value = "/listPageWareHouseType", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageWareHouseType(HttpServletRequest request) {
    	Map<String, Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageWareHouseType(map);
    }
    @RequestMapping(value = "/listWareHouseType", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listWareHouseType(HttpServletRequest request) {
    	return warehouseService.listWareHouseType(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPageInventory", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageInventory(HttpServletRequest request) {
    	Map<String, Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageInventory(map);
    }
    @RequestMapping(value = "/listMaterialDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listMaterialDetail(HttpServletRequest request) {
    	return warehouseService.listMaterialDetail(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listInventoryDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listInventoryDetail(HttpServletRequest request) {
    	return warehouseService.listInventoryDetail(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listWareHouse", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listWareHouse(HttpServletRequest request) {
    	return warehouseService.listWareHouse(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getInventoryById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getInventoryById(HttpServletRequest request) {
    	return warehouseService.getInventoryById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getWareHouseById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getWareHouseById(HttpServletRequest request) {
    	return warehouseService.getWareHouseById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getGdSupplierPurchase", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getGdSupplierPurchase(HttpServletRequest request) {
    	return warehouseService.getGdSupplierPurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getGDBaseById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getGDBaseById(HttpServletRequest request) {
    	return warehouseService.getGDBaseById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getGdPurchase", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getGdPurchase(HttpServletRequest request) {
    	return warehouseService.getGdPurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addInventory", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addInventory(HttpServletRequest request) {
    	return warehouseService.addInventory(requestParameterToMap(request));
    }
    @RequestMapping(value = "/updateInventory", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updateInventory(HttpServletRequest request) {
    	return warehouseService.updateInventory(requestParameterToMap(request));
    }
    @RequestMapping(value = "/deleteInventory", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String deleteInventory(HttpServletRequest request) {
    	return warehouseService.deleteInventory(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addWareHouse", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addWareHouse(HttpServletRequest request) {
    	return warehouseService.addWareHouse(requestParameterToMap(request));
    }
    @RequestMapping(value = "/updateWareHouse", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updateWareHouse(HttpServletRequest request) {
    	return warehouseService.updateWareHouse(requestParameterToMap(request));
    }
    @RequestMapping(value = "/deleteWareHouse", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String deleteWareHouse(HttpServletRequest request) {
    	return warehouseService.deleteWareHouse(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPageMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMaterial(map);
    }
    @RequestMapping(value = "/listPageJGMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageJGMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageJGMaterial(map);
    }
    @RequestMapping(value = "/listPageMaterialWithSelfCost", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMaterialWithSelfCost(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMaterialWithSelfCost(map);
    }
    @RequestMapping(value = "/getMaterialById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getMaterialById(HttpServletRequest request) {
    	return warehouseService.getMaterialById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addMaterial(HttpServletRequest request) {
    	return warehouseService.addMaterial(requestParameterToMap(request));
    }
    @RequestMapping(value = "/updateMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updateMaterial(HttpServletRequest request) {
    	return warehouseService.updateMaterial(requestParameterToMap(request));
    }
    @RequestMapping(value = "/deleteMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String deleteMaterial(HttpServletRequest request) {
    	return warehouseService.deleteMaterial(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPageMaterialDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMaterialDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMaterialDB(map);
    }
    @RequestMapping(value = "/listPageSelfMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageSelfMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageSelfMaterial(map);
    }
    /**
     * 甲供材产品查询
     * @param request
     * @return
     */
    @RequestMapping(value = "/listPageJgMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageJgMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageJgMaterial(map);
    }
    /**
     * 甲供材产品查询
     * @param request
     * @return
     */
    @RequestMapping(value = "/listPageJgDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageJgDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageJgDB(map);
    }
    /**
     * （客户）产品入库单
     * @param request
     * @return
     */
    @RequestMapping(value = "/listCustomerPageMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listCustomerPageMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	if(Utility.isNullorEmpty(String.valueOf(map.get("sort")))){
    		map.put("sort", "operation_date");
    		map.put("order", "desc");
    	}
    	return warehouseService.listCustomerPageMaterial(map);
    }
    /**
     * （客户）产品入库明细
     * @param request
     * @return
     */
    @RequestMapping(value = "/listCustomerMaterialDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listCustomerMaterialDetail(HttpServletRequest request) {
    	return warehouseService.listCustomerMaterialDetail(requestParameterToMap(request));
    }
    /**
     * 客户库产品录入
     * @param request
     * @return
     */
    @RequestMapping(value = "/addCustomerMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addCustomerMaterial(HttpServletRequest request) {
    	return warehouseService.addCustomerMaterial(requestParameterToMap(request));
    }
    /**
     * 客户库产品编辑
     * @param request
     * @return
     */
    @RequestMapping(value = "/updateCustomerMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updateCustomerMaterial(HttpServletRequest request) {
    	return warehouseService.updateCustomerMaterial(requestParameterToMap(request));
    }
    /**
     * 客户库产品信息查询
     * @param request
     * @return
     */
    @RequestMapping(value = "/getCustomerMaterialById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getCustomerMaterialById(HttpServletRequest request) {
    	return warehouseService.getCustomerMaterialById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPageCustomerMaterial", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageCustomerMaterial(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageCustomerMaterial(map);
    }
    /**
     * 删除客户，产品库缓存信息
     * @param request
     * @return
     */
    @RequestMapping(value = "/deleteCusMaterialDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	public @ResponseBody String deleteCusMaterialDetail(HttpServletRequest request) {
		return warehouseService.deleteCusMaterialDetail(requestParameterToMap(request));
	}
    @RequestMapping(value = "/getCSMaterialByCsId", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getCSMaterialByCsId(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	return warehouseService.getCSMaterialByCsId(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listDBProductNumber", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listDBProductNumber(HttpServletRequest request) {
    	return warehouseService.listDBProductNumber(requestParameterToMap(request));
    }
    @RequestMapping(value = "/checkSame", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String checkSame(HttpServletRequest request) {
    	return warehouseService.checkSame(requestParameterToMap(request));
    }
    
    @RequestMapping(value = "/addBeforeMaterialDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addBeforeMaterialDB(HttpServletRequest request) {
    	Map<String, Object> map = requestParameterToMap(request);
		Map<String, Object> sessionMap = (Map<String, Object>) request.getSession().getAttribute("LOGIN_USER");
		map.put("person_id", sessionMap.get("id"));
		map.put("person", sessionMap.get("truename"));
    	return warehouseService.addBeforeMaterialDB(map);
    }
    @RequestMapping(value = "/addSupplierMaterialDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addSupplierMaterialDB(HttpServletRequest request) {
    	Map<String, Object> map = requestParameterToMap(request);
		Map<String, Object> sessionMap = (Map<String, Object>) request.getSession().getAttribute("LOGIN_USER");
		map.put("person_id", sessionMap.get("id"));
		map.put("person", sessionMap.get("truename"));
    	return warehouseService.addSupplierMaterialDB(map);
    }
    @RequestMapping(value = "/addMyMaterialDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addMyMaterialDB(HttpServletRequest request) {
    	Map<String, Object> map = requestParameterToMap(request);
		Map<String, Object> sessionMap = (Map<String, Object>) request.getSession().getAttribute("LOGIN_USER");
		map.put("person_id", sessionMap.get("id"));
		map.put("person", sessionMap.get("truename"));
    	return warehouseService.addMyMaterialDB(map);
    }
    @RequestMapping(value = "/listPageBeforeDBLog", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageBeforeDBLog(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageBeforeDBLog(map);
    }
    @RequestMapping(value = "/listPageMyDBLog", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMyDBLog(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMyDBLog(map);
    }
    @RequestMapping(value = "/listPagePurchaseApplyDBLog", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPagePurchaseApplyDBLog(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPagePurchaseApplyDBLog(map);
    }
    @RequestMapping(value = "/listPageMyDBLog1", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMyDBLog1(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMyDBLog1(map);
    }
    @RequestMapping(value = "/listPageDBSupplierLog", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageDBSupplierLog(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageDBSupplierLog(map);
    }
    @RequestMapping(value = "/listPageWarehouMaterialDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageWarehouMaterialDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageWarehouMaterialDB(map);
    }
    @RequestMapping(value = "/listPageBeforeDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageBeforeDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageBeforeDB(map);
    }
    @RequestMapping(value = "/listPageMyDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageMyDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageMyDB(map);
    }
    @RequestMapping(value = "/listPageSupplierDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageSupplierDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageSupplierDB(map);
    }
    @RequestMapping(value = "/listPagePurchaseApplyDB", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPagePurchaseApplyDB(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPagePurchaseApplyDB(map);
    }
    @RequestMapping(value = "/listPageGDPurchaseApply", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageGDPurchaseApply(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageGDPurchaseApply(map);
    }
    @RequestMapping(value = "/listPageFinishGDPurchaseApply", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageFinishGDPurchaseApply(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageFinishGDPurchaseApply(map);
    }
    @RequestMapping(value = "/listSupplierDb", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listSupplierDb(HttpServletRequest request) {
    	return warehouseService.listSupplierDb(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listSupplierDbView", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listSupplierDbView(HttpServletRequest request) {
    	return warehouseService.listSupplierDbView(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getGDBaseInfoByApplyId", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getGDBaseInfoByApplyId(HttpServletRequest request) {
    	return warehouseService.getGDBaseInfoByApplyId(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getSupplierDbById", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getSupplierDbById(HttpServletRequest request) {
    	return warehouseService.getSupplierDbById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getGDJgByApplyId", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getGDJgByApplyId(HttpServletRequest request) {
    	return warehouseService.getGDJgByApplyId(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getPurchaseById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getPurchaseById(HttpServletRequest request) {
    	return warehouseService.getPurchaseById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getPurchaseProductInCount", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getPurchaseProductInCount(HttpServletRequest request) {
    	return warehouseService.getPurchaseProductInCount(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getSupplierPurchaseById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getSupplierPurchaseById(HttpServletRequest request) {
    	return warehouseService.getSupplierPurchaseById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addPurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addPurchase(HttpServletRequest request) {
    	return warehouseService.addPurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addSupplierPurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addSupplierPurchase(HttpServletRequest request) {
    	return warehouseService.addSupplierPurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/updatePurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updatePurchase(HttpServletRequest request) {
    	return warehouseService.updatePurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/deletePurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String deletePurchase(HttpServletRequest request) {
    	return warehouseService.deletePurchase(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPagePurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPagePurchase(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPagePurchase(map);
    }
    @RequestMapping(value = "/listPageFinishPurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageFinishPurchase(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageFinishPurchase(map);
    }
    @RequestMapping(value = "/listPurchaseDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPurchaseDetail(HttpServletRequest request) {
    	return warehouseService.listPurchaseDetail(requestParameterToMap(request));
    }
    @RequestMapping(value = "/addPurchaseProductIn", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String addPurchaseProductIn(HttpServletRequest request) {
    	Map<String, Object> map = requestParameterToMap(request);
		Map<String, Object> sessionMap = (Map<String, Object>) request.getSession().getAttribute("LOGIN_USER");
		map.put("person_id", sessionMap.get("id"));
		map.put("person", sessionMap.get("truename"));
    	return warehouseService.addPurchaseProductIn(map);
    }
    @RequestMapping(value = "/listPagePurchaseProductIn", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPagePurchaseProductIn(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPagePurchaseProductIn(map);
    }
    @RequestMapping(value = "/listPageFinishPurchaseProductIn", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageFinishPurchaseProductIn(HttpServletRequest request) {
    	Map<String,Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageFinishPurchaseProductIn(map);
    }
    @RequestMapping(value = "/listPurchaseProductInDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPurchaseProductInDetail(HttpServletRequest request) {
    	return warehouseService.listPurchaseProductInDetail(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listSupplierPurchaseDetail", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listSupplierPurchaseDetail(HttpServletRequest request) {
    	return warehouseService.listSupplierPurchaseDetail(requestParameterToMap(request));
    }
    @RequestMapping(value = "/getPurchaseProductInById", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public @ResponseBody String getPurchaseProductInById(HttpServletRequest request) {
    	return warehouseService.getPurchaseProductInById(requestParameterToMap(request));
    }
    @RequestMapping(value = "/updatePurchaseProductIn", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String updatePurchaseProductIn(HttpServletRequest request) {
    	return warehouseService.updatePurchaseProductIn(requestParameterToMap(request));
    }
    @RequestMapping(value = "/deletePurchaseProductIn", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String deletePurchaseProductIn(HttpServletRequest request) {
    	return warehouseService.deletePurchaseProductIn(requestParameterToMap(request));
    }
    @RequestMapping(value = "/listPageGDSupplierPurchase", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public @ResponseBody String listPageGDSupplierPurchase(HttpServletRequest request) {
    	Map<String, Object> map = getPagerMap(request);
    	map.putAll(requestParameterToMap(request));
    	return warehouseService.listPageGDSupplierPurchase(map);
    }
}
